<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
<!--//////////方案一-->
    手机号码： <input type="number"> <button>发送</button>
    <script>
        var btn =document.querySelector('button');
        var time=3;
        btn.addEventListener('click',function(){
            btn.disabled=true;
            exeFun();
            var timer=setInterval(function(){
              exeFun(timer)
            },1000)
        })
        function exeFun(timer=null) {
          if(this.time==0){
            if (timer) clearInterval(timer);
            btn.disabled=false;
            btn.innerHTML='发送';
          }else{
            btn.innerHTML='还剩下'+this.time+'秒';
            this.time--;
          }
        }
    </script>
</body>
</html>
